<template>
    <div>
        <Form :model="formItem" :label-width="180" label-position="right">
            <Card :bordered="false" style="background:#fff;padding: 20px;width: 50vw;">
                <p slot="title">工单详情</p>

                <FormItem label="巡店人：">
                    <Input v-model="formItem.name" class="FormItemInput" disabled></Input>
                </FormItem>

                <FormItem label="巡店时间：">
                    <Input v-model="formItem.time" class="FormItemInput" disabled></Input>
                </FormItem>

                <FormItem label="巡店内容：">
                    <Select class="FormItemInput" v-model="formItem.xj">
                        <Option :value="1"> 卫生 </Option>
                        <Option :value="2"> 照明</Option>
                    </Select>
                </FormItem>

                <FormItem label="是否合格：">
                    <RadioGroup v-model="formItem.is_hg">
                        <Radio :label="0" disabled>合格</Radio>
                        <Radio :label="1" disabled>不合格</Radio>
                    </RadioGroup>
                </FormItem>

                <FormItem label="描述：">
                    <Input type="textarea" v-model="formItem.ms" :autosize="{minRows: 4,maxRows: 10}" class="FormItemInput" disabled></Input>
                </FormItem>

                <FormItem label="动作：">
                    <RadioGroup v-model="formItem.dz">
                        <Radio :label="0" disabled>已解决</Radio>
                        <Radio :label="1" disabled>处理中</Radio>
                        <Radio :label="2" disabled>移交</Radio>
                    </RadioGroup>
                </FormItem>


                <FormItem label="拍照：">
                    <img class="pic" src="@/assets/images/login-bg.jpg" alt="">
                    <img class="pic" src="@/assets/images/login-bg.jpg" alt="">
                    <img class="pic" src="@/assets/images/login-bg.jpg" alt="">
                </FormItem>

                <FormItem label="说明：">
                    <Input type="textarea" v-model="formItem.sm" :autosize="{minRows: 4,maxRows: 10}" class="FormItemInput" disabled></Input>
                </FormItem>


                <FormItem label="说明对象：">
                    <Input v-model="formItem.smObj" class="FormItemInput" disabled></Input>
                </FormItem>


                <FormItem style="padding-top:30px" label="处理动态：">
                    <mySteps style="padding-top:30px" :data="data"></mySteps>
                </FormItem>


                <Button type="primary" class="sure_btn" @click="close">关闭</Button>
            </Card>
        </Form>
    </div>
</template>
<script>
    import mySteps from '../components/steps'
    import {
        mapMutations
    } from 'vuex'
    import axios from '@/libs/api.request'
    export default {
        components: {
            mySteps
        },
        data() {
            return {
                data: [{
                        time: '11-04 11:29',
                        title: '【pt】已确认解决该事项'
                    },
                    {
                        time: '11-08 11:29',
                        title: 'sdfgsdg'
                    },
                ],
                formItem: {
                    name: '张三',
                    time: '2019-9-23',
                    xj: 1,
                    is_hg: 0,
                    ms: '我不听，我不听',
                    dz: 1,
                    sm: '你说啥',
                    smObj: '李四'

                }
            }
        },
        methods: {
            ...mapMutations(['myClose']),
            // 获取工单详情
            getOrderDetail() {},
            // 关闭
            close() {
                this.myClose('order-details')
            },

        },
        created() {
            // this.formItem = this.$route.params
        }
    }
</script>
<style lang="less" scoped>
    .FormItemInput {
        width: 25vw;
    }

    .sure_btn {
        width: 100px;
        display: block;
        margin: 0 auto;
    }

    .pic {
        width: 300px;
        margin-right: 15px;
    }
</style>